﻿@model SPagedList<Dyd.BaseService.ServiceCenter.Domain.Model.tb_service>

<table style="width:100%;" class="hover2" cellspacing="0" cellspadding="0" border="0">
    <tr>
        <th style="width: 5%">@Html.DisplayNameFor(model => model.id)</th>
        <th style="width: 10%">@Html.DisplayNameFor(model => model.servicename)</th>
        <th style="width: 10%">@Html.DisplayNameFor(model => model.servicenamespace)</th>
        <th style="width: 5%">@Html.DisplayNameFor(model => model.servicetype)</th>
        @*<th style="width: 5%">@Html.DisplayNameFor(model => model.istest)</th>
            <th style="width: 10%">@Html.DisplayNameFor(model => model.isautoboostpercent)</th>*@
        <th style="width: 10%">@Html.DisplayNameFor(model => model.protocolversion)</th>
        <th style="width: 10%">@Html.DisplayNameFor(model => model.protocolversionupdatetime)</th>
        <th style="width: 10%">@Html.DisplayNameFor(model => model.serviceupdatetime)</th>
        <th style="width: 10%">节点状态</th>
        <th style="width: 20%">操作</th>
    </tr>

    @foreach (var item in Model)
    {
        <tr data-id="@item.id">
            <td>
                @item.id
            </td>
            <td>
                @item.servicename
            </td>
            <td>
                @item.servicenamespace
            </td>
            <td>
                @(XXF.ProjectTool.EnumHelper<XXF.BaseService.ServiceCenter.SystemRuntime.EnumServiceType>.GetText(item.servicetype))
            </td>
            @*<td>
                    @item.istest
                </td>
                <td>
                    @item.isautoboostpercent
                </td>*@
            <td>
                @item.protocolversion
            </td>
            <td>
                @item.protocolversionupdatetime
            </td>
            <td>
                @item.serviceupdatetime
            </td>
            <td>
                总数:@(item.runningnodecount + item.stopnodecount)<br />
                运行:@(item.runningnodecount)<br />
                停止:@( item.stopnodecount)
            </td>
            <td>
                <a class="editItem btn w50" data-operate="editItem" href="#">编辑</a>
                <a class="showItem btn w50" data-operate="showItem" href="#">查看</a>
                <a class="deleteItem btn w50" data-operate="deleteItem" href="#">删除</a>
                <a class="showNodeItem btn w50" data-operate="showNodeItem" href="#">节点</a>
                <a class="showProtocol btn w50" data-operate="showProtocol" href="#">当前协议</a>
                @*<a class="showClient btn w50" data-operate="showClient" href="#">客户端</a>*@
                <a class="showLog btn w50" data-operate="showLog" href="#">查看日志</a>
            </td>
        </tr>
    }
</table>
<div class="pagination">
    <div class="total fl">共<em>@Model.TotalItemCount</em>条记录</div>
    <div class="pagination-pages">
        @Html.SPager(Model, "pno", "pager_page", "#ajaxList", "#ajaxForm")
    </div>
</div>